# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Jobs.V2.Model.Company do
  @moduledoc """
  A Company resource represents a company in the service. A company is the
  entity that owns job listings, that is, the hiring entity responsible for
  employing applicants for the job position.

  ## Attributes

  *   `careerPageLink` (*type:* `String.t`, *default:* `nil`) - Optional. The URL to employer's career site or careers page on the employer's web
      site.
  *   `companyInfoSources` (*type:* `list(GoogleApi.Jobs.V2.Model.CompanyInfoSource.t)`, *default:* `nil`) - Optional. Identifiers external to the application that help to further identify
      the employer.
  *   `companySize` (*type:* `String.t`, *default:* `nil`) - Optional. The employer's company size.
  *   `disableLocationOptimization` (*type:* `boolean()`, *default:* `nil`) - Deprecated. Do not use this field.

      Optional.

      This field is no longer used. Any value set to it is ignored.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The name of the employer to be displayed with the job,
      for example, "Google, LLC.".
  *   `distributorBillingCompanyId` (*type:* `String.t`, *default:* `nil`) - Optional. The unique company identifier provided by the client to identify an
      employer for billing purposes. Recommended practice is to use
      the distributor_company_id.

      Defaults to same value as distributor_company_id when a value
      is not provided.
  *   `distributorCompanyId` (*type:* `String.t`, *default:* `nil`) - Required. A client's company identifier, used to uniquely identify the
      company. If an employer has a subsidiary or sub-brand, such as "Alphabet"
      and "Google", which the client wishes to use as the company displayed on
      the job. Best practice is to create a distinct company identifier for each
      distinct brand displayed.

      The maximum number of allowed characters is 255.
  *   `eeoText` (*type:* `String.t`, *default:* `nil`) - Optional. Equal Employment Opportunity legal disclaimer text to be
      associated with all jobs, and typically to be displayed in all
      roles.

      The maximum number of allowed characters is 500.
  *   `hiringAgency` (*type:* `boolean()`, *default:* `nil`) - Optional. Set to true if it is the hiring agency that post jobs for other
      employers.

      Defaults to false if not provided.
  *   `hqLocation` (*type:* `String.t`, *default:* `nil`) - Optional. The street address of the company's main headquarters, which may be
      different from the job location. The service attempts
      to geolocate the provided address, and populates a more specific
      location wherever possible in structured_company_hq_location.
  *   `imageUrl` (*type:* `String.t`, *default:* `nil`) - Optional. A URL that hosts the employer's company logo. If provided,
      the logo image should be squared at 80x80 pixels.

      The url must be a Google Photos or Google Album url.
      Only images in these Google sub-domains are accepted.
  *   `keywordSearchableCustomAttributes` (*type:* `list(String.t)`, *default:* `nil`) - Optional. A list of keys of filterable Job.custom_attributes, whose
      corresponding `string_values` are used in keyword search. Jobs with
      `string_values` under these specified field keys are returned if any
      of the values matches the search keyword. Custom field values with
      parenthesis, brackets and special symbols might not be properly searchable,
      and those keyword queries need to be surrounded by quotes.
  *   `keywordSearchableCustomFields` (*type:* `list(integer())`, *default:* `nil`) - Deprecated. Use keyword_searchable_custom_attributes instead.

      Optional.

      A list of filterable custom fields that should be used in keyword
      search. The jobs of this company are returned if any of these custom
      fields matches the search keyword. Custom field values with parenthesis,
      brackets and special symbols might not be properly searchable, and those
      keyword queries need to be surrounded by quotes.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Required during company update.

      The resource name for a company. This is generated by the service when a
      company is created, for example,
      "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd".
  *   `structuredCompanyHqLocation` (*type:* `GoogleApi.Jobs.V2.Model.JobLocation.t`, *default:* `nil`) - Output only. A structured headquarters location of the company,
      resolved from hq_location if possible.
  *   `suspended` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates whether a company is flagged to be suspended from public
      availability by the service when job content appears suspicious,
      abusive, or spammy.
  *   `title` (*type:* `String.t`, *default:* `nil`) - Deprecated. Use display_name instead.

      Required.

      The name of the employer to be displayed with the job,
      for example, "Google, LLC.".
  *   `website` (*type:* `String.t`, *default:* `nil`) - Optional. The URL representing the company's primary web site or home page,
      such as, "www.google.com".
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :careerPageLink => String.t(),
          :companyInfoSources => list(GoogleApi.Jobs.V2.Model.CompanyInfoSource.t()),
          :companySize => String.t(),
          :disableLocationOptimization => boolean(),
          :displayName => String.t(),
          :distributorBillingCompanyId => String.t(),
          :distributorCompanyId => String.t(),
          :eeoText => String.t(),
          :hiringAgency => boolean(),
          :hqLocation => String.t(),
          :imageUrl => String.t(),
          :keywordSearchableCustomAttributes => list(String.t()),
          :keywordSearchableCustomFields => list(integer()),
          :name => String.t(),
          :structuredCompanyHqLocation => GoogleApi.Jobs.V2.Model.JobLocation.t(),
          :suspended => boolean(),
          :title => String.t(),
          :website => String.t()
        }

  field(:careerPageLink)
  field(:companyInfoSources, as: GoogleApi.Jobs.V2.Model.CompanyInfoSource, type: :list)
  field(:companySize)
  field(:disableLocationOptimization)
  field(:displayName)
  field(:distributorBillingCompanyId)
  field(:distributorCompanyId)
  field(:eeoText)
  field(:hiringAgency)
  field(:hqLocation)
  field(:imageUrl)
  field(:keywordSearchableCustomAttributes, type: :list)
  field(:keywordSearchableCustomFields, type: :list)
  field(:name)
  field(:structuredCompanyHqLocation, as: GoogleApi.Jobs.V2.Model.JobLocation)
  field(:suspended)
  field(:title)
  field(:website)
end

defimpl Poison.Decoder, for: GoogleApi.Jobs.V2.Model.Company do
  def decode(value, options) do
    GoogleApi.Jobs.V2.Model.Company.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Jobs.V2.Model.Company do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
